package model

import "time"

const SysNodeMonitorTable = "node_monitor"

const (
	NodeMonitorStatusHealthy = 1
	NodeMonitorStatusWarning = 2
	NodeMonitorStatusFatal   = 3
)

type SysNodeMonitor struct {
	Id               int       `json:"id" gorm:"primaryKey;autoIncrement;column:id"`
	NodePrimaryId    int       `json:"node_primary_id" gorm:"column:node_primary_id"` // 节点ID-节点表ID
	NodeId           string    `json:"node_id" gorm:"column:node_id"`
	NodeName         string    `json:"node_name" gorm:"column:node_name"`
	DiskRatio        float64   `json:"disk_ratio" gorm:"column:disk_ratio"`
	CPURatio         float64   `json:"cpu_ratio" gorm:"column:cpu_ratio"`
	MemoryRatio      float64   `json:"memory_ratio" gorm:"column:memory_ratio"`
	NetWorkRatio     float64   `json:"net_work_ratio" gorm:"column:net_work_ratio"`
	IORatio          float64   `json:"io_ratio" gorm:"column:io_ratio"`
	RAmount          float64   `json:"r_amount" gorm:"column:r_amount"`
	WAmount          float64   `json:"w_amount" gorm:"column:w_amount"`
	RWAmount         float64   `json:"rw_amount" gorm:"column:rw_amount"`
	RPCResponseTime  float64   `json:"rpc_response_time" gorm:"column:rpc_response_time"`
	NodeCurrentHigh  uint64    `json:"node_current_high" gorm:"column:node_current_high"`
	TotalCurrentHigh uint64    `json:"total_current_high" gorm:"column:total_current_high"`
	NodeStatus       int       `json:"node_status" gorm:"column:node_status"`
	CreateTime       time.Time `json:"create_time" gorm:"column:create_time"`
	UpdateTime       time.Time `json:"update_time" gorm:"column:update_time"`
}
